using System;
using System.Data;
using System.Configuration;

namespace IGlobalist.Cms.Model
{
    [Serializable]

    public class Product :CmsObject, IProduct
    {


        #region IProduct Members

        public DateTime PublishedDate
        {
            get
            {
                return Convert.ToDateTime(GetExtPropertyValue("PublishedDate"));
            }
            set
            {
                SetExtPropertyValue("PublishedDate", value);

            }
        }

        public string Code
        {
            get
            {
                return Convert.ToString(GetExtPropertyValue("Code"));
            }
            set
            {
                SetExtPropertyValue("Code", value);

            }
        }

        public string Summary
        {
            get
            {
                return Description;
            }
            set
            {
                Description = value;
            }
        }

        public string Content
        {
            get
            {
                return Convert.ToString(GetExtPropertyValue("Content"));
            }
            set
            {
                SetExtPropertyValue("Content", value);

            }
        }

        

        public double Price
        {
            get
            {
                return Convert.ToDouble(GetExtPropertyValue("Price"));
            }
            set
            {
                SetExtPropertyValue("Price", value);

            }
        }

        public double PriceSale
        {
            get
            {
                return Convert.ToDouble(GetExtPropertyValue("PriceSale"));
            }
            set
            {
                SetExtPropertyValue("PriceSale", value);

            }
        }

        public double Discount
        {
            get
            {
                return Convert.ToDouble(GetExtPropertyValue("Discount"));
            }
            set
            {
                SetExtPropertyValue("Discount", value);

            }
        }

        public string Seller
        {
            get
            {
                return Convert.ToString(GetExtPropertyValue("Seller"));
            }
            set
            {
                SetExtPropertyValue("Seller", value);

            }
        }

        public long PageID
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("PageID"));
            }
            set
            {
                SetExtPropertyValue("PageID", value);

            }
        }

        
        public long ImageTN
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("ImageTN"));
            }
            set
            {
                SetExtPropertyValue("ImageTN", value);

            }
        }


        public long ImagePV
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("ImagePV"));
            }
            set
            {
                SetExtPropertyValue("ImagePV", value);

            }
        }

        public long CategoryID
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("CategoryID"));
            }
            set
            {
                SetExtPropertyValue("CategoryID", value);

            }
        }

        #endregion
        #region ICmsObject Members


        public bool FromCmsObject(CmsObject obj)
        {
            return base.FromCmsObject(obj);
        }

        #endregion


        #region IProduct Members


      

        #endregion
    }
}
